a. Field of the Invention
The present invention relates to architectures of network adapters. In particular, the present invention relates to architectures which optimize the transmission of packets or frames of data across a communication network.
b. Description of Related Art
In a communications network such as a LAN or a WAN, a network adapter manages the transmission and reception of data packets by transferring data between the network and a host computer system memory. The system memory is used by several different devices including the system CPU, Input/Output devices and storage devices as well as the network itself. The network adapter typically accesses the system memory through a shared host system expansion bus, such as a PCI bus.
Network adapters therefore play a key role in the efficiency of the transfer of data between a computer system and a network. Typically, a network adapter transmits data onto a network from a host computer by reading the data out of the host system memory, through a host bridge device, across the expansion bus, into a transmit buffer in the network adapter and then out to the network. This process of moving data from system memory to the adapter transmit buffer can be referred to as a xe2x80x9cdownloadxe2x80x9d. Similarly, data received from the network enters a receive buffer in the network adapter, and from there is moved across the expansion bus, through the host bridge and into system memory buffers. This process can be referred to as an xe2x80x9cuploadxe2x80x9d.
Given the ever increasing demands on computer systems and networks to operate more quickly and efficiently, it has become paramount that network adapters optimize the time during which they have control of an expansion bus to perform uploads and downloads.
One method of optimizing the bus tenure is to maximize burst length. For, in a typical computer system, data bytes are moved across the expansion bus and to the network in groups called bursts. A burst is defined as the number of bytes which can be moved across the expansion bus within the adapter""s tenure on the bus. The burst length is determined by the adapter design, the host bridge design, and the instantaneous demand for the expansion bus. In general, it is optimal if larger bursts are utilized because they increase the efficiency of the expansion bus and, in a high demand environment, allow greater data throughput for each device and for the system as a whole. Typically, the size of these bursts is limited physically by several of the aforementioned devices. First, the particular host bridge implementation will possess a maximum burst length capability, related to the size of its internal buffering and to its internal architecture. Second, the internal buffering of the network adapter itself will similarly limit the maximum burst length capability. Generally speaking, the internal buffering of the network adapter is usually smaller than that of the typical host bridge implementation, and thus the maximum burst length is usually thereby limited. For instance, in a cut-through network adapter, a data packet is copied through the adapter into the shared memory. In order to accomplish this, the adapter buffers the data in a first-in, first-out queue (FIFO) in the adapter. A typical FIFO may, for example, be 128 to 1024 bytes while data packets may be as large as 4500 bytes. This is true because of a desire to minimize the costs of network adaptersxe2x80x94which are typically implemented by application specific integrated circuits (ASICS)xe2x80x94by limiting the amount of memory available for the internal transmit and receive buffers.
Beyond maximizing burst length, another way of optimizing network data throughput is to transmit data onto the network while simultaneously moving the data from system memory across the expansion bus. This also allows the adapter to implement smaller transmit and receive buffers, since there does not need to be a large enough buffer to hold an entire maximum-sized network data packet as discussed above. However, having buffers smaller than a packet introduces the problem of transmit underruns and receive overruns.
A transmit underrun can occur if an adapter is transmitting a packet on to the network, out of its buffer, while simultaneously moving that packet from system memory into its transmit buffer. If the adapter experiences a momentary interruption in the flow of data from system memory, the transmit buffer can go empty, resulting in incorrect data being transmitted to the network. Similarly, a receive overrun occurs if an adapter is receiving a packet from the network, and it is temporarily unable to move the data at sufficient speed across the expansion bus into system memory. Eventually, the receive buffer fills up, and any subsequent data from the network is lost. Both transmit underruns and receive overruns result in degraded performance in the network, and are to be avoided.
Therefore, what is needed is a method and an apparatus which further optimizes the transfer of data between a host computer system and a network without needlessly increasing the size, and cost, of network adapter buffers, and without subjecting the system to performance degrading data overruns and underruns.
As discussed above, the optimization of data transfer between a host system and a network is an important factor in the design of computer networks such as local area networks (LAN) and wide area networks (WAN). The optimization of data transfer may include maximizing the amount of data transferred to/from the host system during a particular bus tenure while simultaneously minimizing the number of underruns and overruns in the system. As will be set out below in further detail, the present invention includes a method and apparatus for optimizing the transfer of data between a host computer system and a network without needlessly increasing the size, and cost, of network adapter buffers, and without subjecting the system to performance degrading data overruns and underruns.
In one embodiment, the present invention is characterized as a method for transferring data between a host computer and a network medium coupled to the host computerxe2x80x94the host computer includes an expansion bus and a network adapter device coupled to the expansion bus and to the network medium. In this embodiment, the method includes transferring data between a buffer memory in the network adapter and the network medium, and generating a first buffer data signal in response to the amount of data present in the buffer memory. The method further includes generating a second buffer data signal in response to the length of previous transfers of data between the host computer and the network medium. Accordingly, the second buffer data signal represents the amount of data in the buffer at the time when the expansion bus should be requested by the network adapter device to optimize a data transfer between the network adapter and the host computer. The method also includes the steps of asserting a bus request signal to the host computer in response to the first and second buffer data signals and finally transferring data between the host computer and the buffer memory over the expansion bus.
In one instance of this embodiment, the step of asserting the bus request signal comprises providing the first and second buffer data signals to a dynamic bus request control logic, comparing the first buffer data signal with the second buffer data signal, and generating the bus request signal when the value of the first buffer data signal satisfies a logical relation to, such as is one of greater than and less than, the second buffer data signal.
In still another embodiment, the method is further defined in that generating the second buffer data signal is responsive to the size of data bursts transferred between the host computer and the buffer memory. In one instance of this embodiment, generating the second buffer data signal includes monitoring the size of each data burst transferred between the host computer and the buffer memory and updating the value of the second buffer data signal such that the second buffer data signal comprises a value representative of the size of the maximum sized data burst transferred between the host computer and the buffer memory since the host computer was powered on.
In one instance of this embodiment, the step of asserting the bus request signal comprises providing the first and second buffer data signals to a dynamic bus request control logic. The dynamic bus request control logic compares the first buffer data signal with the second buffer data signal and generates the bus request signal when the value of the first buffer data signal satisfies a logic relation to the second buffer data signal.
In still another embodiment of the basic method, the step of generating the second buffer data signal is responsive to an estimated latency signal. In one instance of this embodiment the second buffer data signal comprises the difference of the estimated latency signal and an optimal packet length signal. The optimal burst length signal represents the length of a piece of data which will optimize an individual data transfer between the host computer and the buffer memory. In one instance, the estimated latency signal comprises an estimate of the amount of data transfer that would occur between the host memory and the buffer memory during a time period comprising the result of a function of latency times of one or more previous transfers, such as the latency time of the immediately previous data transfer between the host memory and the buffer memory, an average latency time of a plurality of previous transfers, or a function of latency time of previous transfers having a particular characteristic.
In a farther instance, the step of generating the optimal burst length signal comprises monitoring the size of each data burst transferred between the host computer and the buffer memory and updating the value of the optimal burst length signal such that the optimal burst length signal comprises a value representative of the size of the maximum sized data packet transferred between the host computer and the buffer memory since the host computer was powered on. This embodiment is further described in another instance in which the step of asserting the bus request signal comprises providing the first and second buffer data signals to a dynamic bus request control logic. As above, the dynamic bus request control logic compares the first buffer data signal with the second buffer data signal and generates the bus request signal when the value of the first buffer data signal satisfies a logic relation to the value of the second buffer data signal.
The above described method embodiments of the invention may be further described by the step of providing a priority threshold signal and asserting the bus request signal when the value of the first buffer data signal satisfies a logic relation to the priority threshold signal. In one instance the priority threshold signal comprises a signal generated in response to previous transfers of data between the host computer and the network medium. In a still further description of the above embodiments, the buffer memory comprises a memory that is smaller than the maximum size data packet utilized in the communication system.
The invention as summarized above with respect to a method may be alternatively characterized as a network adapter apparatus for controlling the transfer of data between a host computer and a network medium. In one embodiment, the apparatus is described as a device including a means to perform each of the aforementioned method steps.
In another embodiment the apparatus is described as a network adapter apparatus comprising a buffer memory that transfers data between the host computer and the network medium and a buffer control logic that generates a first buffer data signal in response to the amount of data in the buffer memory. Also included is a bus control logic that generates a second buffer data signal in response to previous transfers of data between the host computer and the network medium and a dynamic bus request logic that asserts a bus request signal at a time responsive to the first and second buffer data signals to initiate an optimized data transfer between the host computer and the buffer memory during a contemporaneous transfer of data between the buffer memory and the network medium. In one instance, the dynamic bus request logic asserts the bus request signal when the value of the first buffer data signal satisfies a logic relation to the value of the second buffer data signal.
In another embodiment of the network adapter the bus control logic further comprises a target burst logic that generates the second buffer data signal in response to the size of data bursts transferred between the host computer and the buffer memory. In one instance, the target burst logic comprises monitor logic that monitors the size of each data burst transferred between the host computer and the buffer memory and a first compare logic that updates the value of the second buffer data signal such that the second buffer data signal comprises a value representative of the size of previous bursts based on a statistical function, such as the maximum sized data packet transferred between the host computer and the buffer memory since the host computer was powered on, or alternatively a data packet of practical size, based on statistically filtering out anomalous packet sizes and selecting a practical maximum of the result. In one case, the dynamic bus request logic asserts the bus request signal when the value of the first buffer data signal satisfies a logic relation to the value of the second buffer data signal.
In still another embodiment, the bus control logic further comprises a latency logic that generates an estimated latency signal wherein the second buffer data signal is responsive to the estimated latency signal. In another instance of this embodiment, the bus control logic further comprises a target burst logic that generates an optimal burst length signal representative of the length of a piece of data which will optimize an individual data transfer between the host computer and the buffer memory. In one case the second buffer data signal comprises the difference of the estimated latency signal and the optimal burst length signal.
In a further characterization of this embodiment the estimated latency signal comprises an estimate of the amount of data transfer that would occur between the host computer and the buffer memory during a time period comprising the latency time of the previous data transfer between the host computer and the buffer memory.
In a still further characterization, the target burst logic comprises monitor logic that monitors the size of each data burst transferred between the host computer and the buffer memory; and a first compare logic that updates the value of the optimal burst length signal such that the optimal burst length signal comprises a value representative of the size of the maximum sized data packet transferred between the host computer and the buffer memory since the host computer was powered on. In this case, the dynamic bus request logic asserts the bus request signal when the value of the first buffer data signal satisfies a logic relation to the value of the second buffer data signal.
Each of the above embodiments of the network adapter apparatus may be further characterized in that the bus control logic also includes a priority logic that provides a priority threshold signal to the dynamic bus request logic such that the dynamic bus request logic asserts the bus request signal when the value of the first buffer data signal is one of greater than and less than the priority threshold signal. In one instance, the priority threshold signal comprises a signal generated in response to previous transfers of data between the host computer and the network medium. Also, the buffer memory may comprise a memory that is smaller than the maximum size data packet utilized in the communication system.
Accordingly, the present invention provides a method and apparatus for dynamically controlling the requesting of a host computer expansion bus in order to maximize the efficiency of data transfer to and from a network medium to which the host computer is coupled while minimizing the number of underruns and overruns in the system.
Other aspects and advantages of the present invention can be seen upon review of the figures, the detailed description, and the claims which follow.